<script lang="ts" setup>
import type { PropType } from 'vue'
import { getDescSchema } from './data'
import type { ErrorLogInfo } from '#/store'
import { BasicModal } from '@/components/Modal'
import { Description, useDescription } from '@/components/Description'

defineProps({
  info: {
    type: Object as PropType<ErrorLogInfo>,
    default: null,
  },
})

const [register] = useDescription({
  column: 2,
  schema: getDescSchema()!,
})
</script>

<template>
  <BasicModal :width="800" title="详情" v-bind="$attrs">
    <Description :data="info" @register="register" />
  </BasicModal>
</template>
